// async_calculate.js

const fs = require('mz/fs');

module.exports = async () => {
    // `./res/data.txt` 这里的路径是相对于'node_modules'的
    let expression = await fs.readFile('./res/data.txt', 'utf-8');
    let fn = new Function('return ' + expression);
    let r = fn();
    console.log(`Calculate: ${expression} = ${r}`);
    return r;
};
